home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / IDLIncludes / HIControls.idl < prev    next >
Text File  |  1996-05-01  |  8KB  |  381 lines

  1. /*
  2.      File:        HIControls.idl
  3.  
  4.      Contains:    IDL interface for the HIControls class
  5.  
  6.      Version:    Technology:    System 8.0
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1995-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16. */
  17.  
  18.  
  19.  
  20. #ifndef __HICONTROLS_IDL__
  21. #define __HICONTROLS_IDL__
  22.  
  23. #include <HIPanels.idl>
  24. #include <HIControlTypes.idl>
  25.  
  26. interface HIControl : HIPanel
  27. {
  28. // ======================================================
  29. // Public Methods
  30. // ======================================================
  31.  
  32. // * Initializer *
  33.  
  34.     // Initialize controls value, minimum, and maximum
  35.     OSStatus InitControl(    in RefLabel                identifier,
  36.                             in HIWindow                window, 
  37.                             in Rect                    bounds, 
  38.                             in SInt32                value,
  39.                             in SInt32                minimumValue,
  40.                             in SInt32                maximumValue);
  41.                             
  42. // * Accessors *
  43.  
  44.     // Set and get the controls value
  45.     void SetValue(in SInt32    newValue);
  46.     SInt32 GetValue();
  47.  
  48.     // Set and get the controls minimum value
  49.     void SetMinimum(in SInt32    newMinimum);
  50.     SInt32 GetMinimum();
  51.  
  52.     // Set and get the controls maximum value
  53.     void SetMaximum(in SInt32    newMaximum);
  54.     SInt32 GetMaximum();
  55.  
  56. // * Selection simulation *
  57.     void SimulateSelection ();
  58.     
  59.  
  60.     
  61.     implementation 
  62.     {
  63.  
  64.         passthru C_h =    "#include <Types.h>"
  65.                         "#include <HIObjectTypes.h>"
  66.                         "#include <HIControlTypes.h>";
  67.  
  68.         passthru C_xh =    "#include <Types.h>"
  69.                         "#include <HIObjectTypes.h>"
  70.                         "#include <HIControlTypes.h>";
  71.  
  72.         releaseorder:            InitControl,
  73.                                 SetValue,
  74.                                 GetValue,
  75.                                 SetMinimum,
  76.                                 GetMinimum,
  77.                                 SetMaximum,
  78.                                 GetMaximum,
  79.                                 SimulateSelection,
  80.                                 reserved0,
  81.                                 reserved1;
  82.     };
  83. };
  84.  
  85. interface HIPushButton : HIControl
  86. {
  87. // ======================================================
  88. // Public Methods
  89. // ======================================================
  90.  
  91. // * Initializer *
  92.  
  93.     OSStatus InitPushButton(in RefLabel                            identifier,
  94.                             in HIWindow                         window, 
  95.                             in Rect                             bounds);
  96.  
  97.     void SetAdornment (in HIAdornment adornment);
  98.     HIAdornment GetAdornment ();
  99.     
  100.     implementation 
  101.     {
  102.         
  103.         releaseorder:        InitPushButton,
  104.                             SetAdornment,
  105.                             GetAdornment;
  106.     };    
  107. };
  108.  
  109. interface HIBevelButton : HIControl
  110. {
  111. // ======================================================
  112. // Public Methods
  113. // ======================================================
  114.  
  115. // * Initializer *
  116.  
  117.     OSStatus InitBevelButton(    in RefLabel                            identifier,
  118.                                 in HIWindow                         window, 
  119.                                 in Rect                             bounds,
  120.                                 in HIControlBehavior                behavior);
  121.  
  122. // * Behavior *
  123.  
  124.     void SetBehavior(in HIControlBehavior    newBehavior);
  125.     HIControlBehavior GetBehavior();
  126.     
  127.     implementation 
  128.     {
  129.         
  130.         releaseorder:            InitBevelButton,
  131.                                 SetBehavior,
  132.                                 GetBehavior;
  133.     };    
  134. };
  135.  
  136. interface HICheckBox : HIControl
  137. {
  138. // ======================================================
  139. // Public Methods
  140. // ======================================================
  141.  
  142. // * Initializer *
  143.  
  144.     OSStatus InitCheckBox(    in RefLabel                                identifier,
  145.                             in HIWindow                             window, 
  146.                             in Rect                                 bounds);
  147.                             
  148.     implementation 
  149.     {
  150.         
  151.         releaseorder:            InitCheckBox;
  152.     };    
  153. };
  154.  
  155. interface HIRadioButton : HIControl
  156. {
  157. // ======================================================
  158. // Public Methods
  159. // ======================================================
  160.  
  161. // * Initializer *
  162.  
  163.     OSStatus InitRadioButton(    in RefLabel                                identifier,
  164.                                 in HIWindow                             window, 
  165.                                 in Rect                                 bounds);
  166.                                 
  167.     implementation 
  168.     {
  169.         
  170.         releaseorder:            InitRadioButton;
  171.     };    
  172. };
  173.  
  174. interface HIDisclosureTriangle : HIControl
  175. {
  176. // ======================================================
  177. // Public Methods
  178. // ======================================================
  179.  
  180. // * Initializer *
  181.  
  182.     OSStatus InitDisclosureTriangle(in RefLabel                identifier,
  183.                                     in HIWindow             window, 
  184.                                     in Point                anchor);
  185.  
  186. // * Values *
  187.  
  188.     // Returns true if the triangle is disclosed, false otherwise
  189.     boolean IsDisclosed();
  190.  
  191.     implementation 
  192.     {
  193.         
  194.         releaseorder:            InitDisclosureTriangle,
  195.                                 IsDisclosed;
  196.     };    
  197. };
  198.  
  199. interface HIScrollBar : HIControl
  200. {    
  201. // ======================================================
  202. // Public Methods
  203. // ======================================================
  204.  
  205. // * Initializer *
  206.  
  207.     OSStatus InitScrollBar(    in RefLabel                        identifier,
  208.                             in HIWindow                     window, 
  209.                             in Rect                         bounds,
  210.                             in SInt32                        value,
  211.                             in SInt32                        minimumValue,
  212.                             in SInt32                        maximumValue);
  213.  
  214. // * Deltas *
  215.  
  216.     void SetArrowDelta(in UInt32 delta);
  217.     UInt32 GetArrowDelta();
  218.     
  219.     void SetPageDelta(in UInt32 delta);
  220.     UInt32 GetPageDelta();
  221.  
  222.     implementation 
  223.     {
  224.  
  225.         releaseorder:            InitScrollBar,
  226.                                 SetArrowDelta,
  227.                                 GetArrowDelta,
  228.                                 SetPageDelta,
  229.                                 GetPageDelta;
  230.     };
  231. };
  232.  
  233. interface HISlider : HIControl
  234. {
  235. // ======================================================
  236. // Public Methods
  237. // ======================================================
  238.  
  239. // * Initializer *
  240.  
  241.     OSStatus InitSlider(in RefLabel                identifier,
  242.                         in HIWindow                window, 
  243.                         in Rect                    bounds,
  244.                         in SInt32                value,
  245.                         in SInt32                minimumValue,
  246.                         in SInt32                maximumValue);
  247.  
  248.     implementation 
  249.     {
  250.  
  251.         releaseorder:            InitSlider;
  252.     };
  253. };
  254.  
  255. interface HILittleArrows : HIControl
  256. {
  257. // ======================================================
  258. // Public Methods
  259. // ======================================================
  260.  
  261. // * Initializer *
  262.  
  263.     OSStatus InitLittleArrows(    in RefLabel                identifier,
  264.                                 in HIWindow                window, 
  265.                                 in Point                anchor,
  266.                                 in SInt32                value,
  267.                                 in SInt32                minimumValue,
  268.                                 in SInt32                maximumValue);
  269.  
  270. // * Deltas
  271.  
  272.     void SetArrowDelta(in UInt32 delta);
  273.     UInt32 GetArrowDelta();
  274.     
  275.     implementation 
  276.     {
  277.         
  278.         releaseorder:            InitLittleArrows,
  279.                                 SetArrowDelta,
  280.                                 GetArrowDelta;
  281.     };
  282. };
  283.  
  284. interface HIProgressIndicator : HIControl
  285. {    
  286. // ======================================================
  287. // Public Methods
  288. // ======================================================
  289.  
  290. // * Initializer *
  291.  
  292.     OSStatus InitProgressIndicator(    in RefLabel                    identifier,
  293.                                     in HIWindow                    window,
  294.                                     in Rect                        bounds,
  295.                                     in HIControlBehavior        behavior);
  296.                                                 
  297. // * Behavior
  298.  
  299.     void SetBehavior(in HIControlBehavior    newBehavior);
  300.     HIControlBehavior GetBehavior();
  301.     
  302. // * kHIIndeterminate indicator spin control *
  303.  
  304.     void SpinForward();
  305.     void SpinBackward();
  306.     
  307.     implementation 
  308.     {
  309.  
  310.         releaseorder:            InitProgressIndicator,
  311.                                 SetBehavior,
  312.                                 GetBehavior,
  313.                                 SpinForward,
  314.                                 SpinBackward;
  315.     };
  316. };
  317.  
  318. interface HIMenu;
  319.  
  320. interface HIPopUpControl : HIControl
  321. {
  322.     
  323. // ======================================================
  324. // Public Methods
  325. // ======================================================
  326.  
  327. // * Initializer *
  328.  
  329.     OSStatus InitPopUpControl(    in RefLabel                identifier,
  330.                                 in HIWindow                window,
  331.                                 in Rect                    bounds);
  332.  
  333. // * Menu access *
  334.  
  335.     void SetMenu(in HIMenu    menu);
  336.     HIMenu GetMenu();
  337.  
  338.     implementation
  339.     {
  340.         
  341.         releaseorder:    InitPopUpControl,
  342.                         SetMenu,
  343.                         GetMenu;
  344.     };
  345. };
  346.     
  347. interface HIPopUpButton : HIPopUpControl
  348. {
  349. // ======================================================
  350. // Public Methods
  351. // ======================================================
  352.  
  353. // * Initializer *
  354.  
  355.     OSStatus InitPopUpButton(    in RefLabel                identifier,
  356.                                 in HIWindow             window, 
  357.                                 in Rect                 bounds);
  358.  
  359. // * Title width *
  360.  
  361.     void AutomaticallyCalculateTitleWidth();
  362.     void ManuallySetTitleWidth();
  363.     boolean IsTitleWidthAutomaticallyCalculated();
  364.  
  365.     void SetTitleWidth(in UInt16 titleWidth);
  366.     UInt16 GetTitleWidth();
  367.  
  368.     implementation 
  369.     {
  370.         
  371.         releaseorder:    InitPopUpButton,
  372.                         AutomaticallyCalculateTitleWidth,
  373.                         ManuallySetTitleWidth,
  374.                         IsTitleWidthAutomaticallyCalculated,
  375.                         SetTitleWidth,
  376.                         GetTitleWidth;
  377.     };    
  378. };
  379.  
  380. #endif
  381.